﻿//    Texture.cs
//    Created by Dave Kerr, 12/08/2003
//    Copyright (c) Dave Kerr
//    http://www.dopecode.co.uk
//
//    29th June 2007: Looked over the texturing code again for Example 3.

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Design;
using System.ComponentModel;
using SharpGL;

namespace MutsiEngine
{
    /// <summary>
    /// A Texture object is simply an array of bytes. It has OpenGL functions, but is
    /// not limited to OpenGL, so DirectX or custom library functions could be later added.
    /// </summary>
    public class Texture : Object
    {
        public uint TextureAdress;
        public int Width, Height;

        /// <summary>
        /// This wraps the OpenGL function that makes the texture 'current'.
        /// </summary>
        public virtual void Bind(OpenGL gl)
        {
            //Bind our texture object (make it the current texture).
            //gl.BindTexture(OpenGL.GL_TEXTURE_2D, TextureName);
            //  Bind our texture object (make it the current texture).
            gl.BindTexture(OpenGL.GL_TEXTURE_2D, TextureAdress);
        }

    }
}